// 举报反馈相关的接口函数
import request from '@/utils/http.js'

//1.添加反馈举报

export const addReportAPI = (data) => {
    return request({
        url: '/report/addReport',
        method: 'post',
        data: {
            reportUserId: data.reportUserId,
            reportUserRole: data.reportUserRole,
            reportPersonName: data.reportPersonName,
            reportPersonAccount: data.reportPersonAccount,
            reportPersonContact: data.reportPersonContact,
            reportDescribe: data.reportDescribe,
            reportStatus: data.reportStatus,
            reportCheckStatus: data.reportCheckStatus,
            reportCheckRemark: data.reportCheckRemark,
            imageList: data.imageList // 新增这一行，将传入的fileList添加到发送的数据中
        }
    })
}

// 2.查询举报反馈，通过举报人账号
export const queryReportByAccountAPI = (reportPersonAccount) => {
    return request({
        url: '/report/queryReportByAccount',
        method: 'post',
        params: {
            reportPersonAccount: reportPersonAccount
        }
    })
}

//3.查询举报反馈图片，通过类别ID
export const queryReportImageAPI = (reportId) => {
    return request({
        url: '/report/queryReportImage',
        method: 'post',
        params: {
            reportId: reportId
        }
    })
}

//4。更新举报反馈
export const updateReportAPI = (data) => {
    return request({
        url: '/report/updateReport',
        method: 'post',
        data: {
            reportId: data.reportId,
            reportPersonContact: data.reportPersonContact,
            reportDescribe: data.reportDescribe,
            reportStatus: data.reportStatus,
            reportCheckStatus:data.reportCheckStatus,
            reportCheckRemark: data.reportCheckRemark,
            imageList: data.imageList // 新增这一行，将传入的fileList添加到发送的数据中
        }
    })
}

//5.分页获取举报反馈
export const pageReportAPI = (data) => {
    return request({
        url: '/report/pageReport',
        method: 'post',
        data: {
            pageCurrent: data.pageCurrent,
            pageSize: data.pageSize,
            reportStatus: data.reportStatus,
            reportCheckStatus: data.reportCheckStatus
        }
    })
}

//6.查询反馈举报-通过举报ID
export const queryReportByReportIdAPI=(reportId)=>{
    return request({
        url: '/report/queryReportByReportId',
        method: 'post',
        params: {
            reportId: reportId
        }
    })
}

//7.更新反馈审核状态